package me.liangdi.spring.todo.bean;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * Created by liangdi on 1/5/16.
 */
@Document
public class Todo {
    @Id
    private String id;
    /**
     * 列表的ID
     */
    @Indexed  private String todoListId;
    /**
     * todo 的内容
     */
    private String content;
    /**
     * 是否完成
     */
    @Indexed  private boolean completed;
    /**
     * 删除标记
     */
    @Indexed private boolean deleted;
    /**
     * 排序
     */
    private int order;

    public Todo(String content) {
        this.content = content;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public boolean isCompleted() {
        return completed;
    }

    public void setCompleted(boolean completed) {
        this.completed = completed;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }

    public String getTodoListId() {
        return todoListId;
    }

    public void setTodoListId(String todoListId) {
        this.todoListId = todoListId;
    }
}
